using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using BodySoundSimulator.CaseData;
using BodySoundSimulator.CommonElements;

namespace BodySoundSimulator.Training
{
    public partial class Trainer : UserControl
    {
        #region Fields
        IApplicationServices appServices;
        CaseInformation loadedCaseInfo;
        #endregion

        #region Constructors
        public Trainer(IApplicationServices services)
        {
            InitializeComponent();
            this.appServices = services;
        }
        #endregion

        #region Private methods
        private void UpdateUI()
        {
            //DrawFrontViewForTesting();
        }
        #endregion

        #region UIEventHandlers

        private void btnLoad_Click(object sender, EventArgs e)
        {
            LoadCaseDialog caseLoadingDialog = new LoadCaseDialog(this.appServices.ExistingCases);
            if (caseLoadingDialog.ShowDialog() == DialogResult.OK)
            {
                this.loadedCaseInfo = caseLoadingDialog.SelectedCaseInfo;
                this.pnlTrainerMain.Enabled = true;
                this.radioBackView.Checked = false;
                this.radioFrontView.Checked = true;
                UpdateUI();
            }
        }
        #endregion
    }
}
